home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / Tie::SubstrHash.Z / Tie::SubstrHash
Encoding:
Text File  |  1998-10-28  |  2.2 KB  |  67 lines

  1.  
  2.  
  3.  
  4.      TTTTiiiieeee::::::::SSSSuuuubbbbssssttttrrrrHHHHaaaasssshhhh((((3333))))22223333////JJJJuuuullll////99998888    ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222TTTT))))iiiieeee::::::::SSSSuuuubbbbssssttttrrrrHHHHaaaasssshhhh((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       Tie::SubstrHash - Fixed-table-size, fixed-key-length hashing
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           require Tie::SubstrHash;
  13.  
  14.           tie %myhash, 'Tie::SubstrHash', $key_len,    $value_len, $table_size;
  15.  
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.       The TTTTiiiieeee::::::::SSSSuuuubbbbssssttttrrrrHHHHaaaasssshhhh package provides a hash-table-like
  19.       interface to an array    of determinate size, with constant key
  20.       size and record size.
  21.  
  22.       Upon tying a new hash    to this    package, the developer must
  23.       specify the size of the keys that will be used, the size of
  24.       the value fields that    the keys will index, and the size of
  25.       the overall table (in    terms of key-value pairs, not size in
  26.       hard memory).    _T_h_e_s_e _v_a_l_u_e_s _w_i_l_l _n_o_t _c_h_a_n_g_e _f_o_r _t_h_e _d_u_r_a_t_i_o_n
  27.       _o_f _t_h_e _t_i_e_d _h_a_s_h. The    newly-allocated    hash table may now
  28.       have data stored and retrieved. Efforts to store more    than
  29.       $table_size elements will result in a    fatal error, as    will
  30.       efforts to store a value not exactly $value_len characters
  31.       in length, or    reference through a key    not exactly $key_len
  32.       characters in    length.    While these constraints    may seem
  33.       excessive, the result    is a hash table    using much less
  34.       internal memory than an equivalent freely-allocated hash
  35.       table.
  36.  
  37.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  38.       Because the current implementation uses the table and    key
  39.       sizes    for the    hashing    algorithm, there is no means by    which
  40.       to dynamically change    the value of any of the    initialization
  41.       parameters.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.